package com.app.service.impl;

import com.app.conf.RedisService;
import com.app.mapper.LiveCompanyMapper;
import com.app.mapper.LiveCompanyPostMapper;
import com.app.mapper.LiveRecordMapper;
import com.app.mapper.NewsMapper;
import com.app.model.*;
import com.app.service.EnterpriseService;
import com.app.service.JobPublishService;
import com.app.service.LiveService;
import com.app.service.NewsService;
import com.app.util.CommonHelp;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;


/**
 * @Description:新闻实现类
 * @Author: N
 * @Date: 2022年11月24日 10点29分
 */
@Service
public class NewsServiceImpl implements NewsService {
    @Autowired
    NewsMapper newsMapper;

    @Override
    public int getCountAll() {
        return newsMapper.selectCount(null);
    }

    @Override
    public void delete(Integer id) {
        newsMapper.deleteById(id);
    }

    @Override
    public List<NewsModel> selectByKeyword(String keyword) {
        return newsMapper.selectByKeyword(keyword);
    }
}
